package com.bluestone.context;

import java.util.ArrayList;
import java.util.List;

import com.bluestone.scripts.Execute;
import com.bluestone.scripts.TestSuite;
import com.bluestone.util.Util;

public class ExecuteContext extends ContextBase{
	public ExecuteContext(Execute exe){
		this.execute = exe;
		this.execute.setId(""+System.currentTimeMillis());
		this.setId(execute.getId());
		createTestSuiteContext();
	}
	
	Execute execute = null;

	
	TestSuiteContext testSuiteContext = null;

	
	private void createTestSuiteContext(){
		TestSuite testSuite = (TestSuite)Util.loadObjectFromFile(execute.getFile(), TestSuite.class);
		testSuiteContext = new TestSuiteContext(testSuite);
		
	}
	public Execute getExecute() {
		return execute;
	}
	public void setExecute(Execute execute) {
		this.execute = execute;
	}
	public TestSuiteContext getTestSuiteContext() {
		return testSuiteContext;
	}
	public void setTestSuiteContext(TestSuiteContext testSuiteContext) {
		this.testSuiteContext = testSuiteContext;
	}	

}
